/*
 * Wazuh Vulnerability Scanner - Unit Tests
 * Copyright (C) 2015, Wazuh Inc.
 * September 21, 2023.
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General Public
 * License (version 2) as published by the FSF - Free Software
 * Foundation.
 */

#ifndef _FACTORY_ORCHESTRATOR_TEST_HPP
#define _FACTORY_ORCHESTRATOR_TEST_HPP

#include "scanOrchestrator/factoryOrchestrator.hpp"
#include "gtest/gtest.h"

constexpr auto INVENTORY_DB_PATH = "queue/vd/inventory";

/**
 * @brief Runs unit tests for FactoryOrchestrator
 */
class FactoryOrchestratorTest : public ::testing::Test
{
protected:
    // LCOV_EXCL_START
    FactoryOrchestratorTest() = default;
    ~FactoryOrchestratorTest() override = default;
    // LCOV_EXCL_STOP

    /**
     * @brief Set up for every test.
     *
     */
    void SetUp() override
    {
        m_inventoryDatabase = std::make_unique<Utils::RocksDBWrapper>(INVENTORY_DB_PATH);
    }

    /**
     * @brief Tear down for every test.
     *
     */
    void TearDown() override
    {
        std::remove(INVENTORY_DB_PATH);
    }

    /**
     * @brief RocksDB inventory database.
     *
     */
    std::unique_ptr<Utils::RocksDBWrapper> m_inventoryDatabase;
};

#endif // _FACTORY_ORCHESTRATOR_TEST_HPP
